package cn.edu.sgu.www.mhxysy.dto.chongwu;

import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import cn.edu.sgu.www.mhxysy.consts.RegExps;
import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class ChongwuZizhiDTO implements DataTransferObject {

	/**
	 * 攻击资质
	 */
	@Positive(message = "攻击资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "攻击资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "攻击资质", required = true)
	private Integer gjzz;

	/**
	 * 防御资质
	 */
	@Positive(message = "防御资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "防御资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "防御资质", required = true)
	private Integer fyzz;

	/**
	 * 体力资质
	 */
	@Positive(message = "体力资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "体力资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "体力资质", required = true)
	private Integer tlzz;

	/**
	 * 法力资质
	 */
	@Positive(message = "法力资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "法力资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "法力资质", required = true)
	private Integer flzz;

	/**
	 * 速度资质
	 */
	@Positive(message = "速度资质" + CustomMessages.ILLEGAL)
	@NotNull(message = "速度资质" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "速度资质", required = true)
	private Integer sdzz;

	/**
	 * 宠物成长
	 */
	@Range(min = 0, max = 1300, message = "宠物成长" + CustomMessages.ILLEGAL)
	@NotNull(message = "宠物成长" + CustomMessages.NOT_NULL)
	@ApiModelProperty(value = "宠物成长", required = true)
	private Integer chengzhang;

	/**
	 * 宠物ID
	 */
	@Pattern(regexp = RegExps.CHONGWU_ID, message = "宠物ID" + CustomMessages.ILLEGAL)
	@NotBlank(message = CustomMessages.CHONGWU_ID_NOT_NULL)
	@ApiModelProperty(value = "宠物ID", required = true)
	private String chongwuId;
}